/*
    SUSAN® - Sole of Unix Save ANything

   Copyright (C) 2016-2019 Skyatlas co. ltd

   
*/


#ifndef BAREOS_TESTS_BAREOS_TEST_SOCKETS_H_
#define BAREOS_TESTS_BAREOS_TEST_SOCKETS_H_

#include <memory>

class BareosSocketTCP;
class BareosSocket;

class TestSockets {
 public:
  std::unique_ptr<BareosSocket> server;
  std::unique_ptr<BareosSocketTCP> client;

  TestSockets() = default;
  TestSockets(const TestSockets&) = delete;
};

int create_accepted_server_socket(int port);
BareosSocket* create_new_bareos_socket(int fd);
std::unique_ptr<TestSockets> create_connected_server_and_client_bareos_socket();
uint16_t create_unique_socket_number();

#endif /* BAREOS_TESTS_BAREOS_TEST_SOCKETS_H_ */
